<%-- 
    Document   : all error page
    Created on : Sep 16, 2008, 
    Author     : Heweiya
--%>
<%@ page contentType="text/html;charset=UTF-8" isErrorPage="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
	<head>
		<title><spring:message code="application.error.title" /></title>
		<script src="<c:url value="/script/jquery-1.2.6.js"/>"
			type="text/javascript"></script>
		<link href="<%=request.getContextPath()%>/style/style.css"
			type="text/css" rel="stylesheet" />
		<link href="<%=request.getContextPath()%>/style/ie6.css"
			type="text/css" rel="stylesheet" />
	</head>
	<%
		Throwable ex = null;
		if (exception != null)
			ex = exception;
		if (request.getAttribute("javax.servlet.error.exception") != null)
			ex = (Exception) request
					.getAttribute("javax.servlet.error.exception");
	%>
	<body>
	<center>
		<div id="wrapper">
			<!--START: Header -->
			
			<div class="menu">
					<ul>
						<li class="n1"><a href="<%= request.getContextPath()%>/designer/questionnaire/list.html">Dialogs</a></li>
						<li class="n2"><a href="<%= request.getContextPath()%>/designer/questionset/list.html"">Pages</a></li>
						<li class="n3"><a href="<%= request.getContextPath()%>/designer/question/list.html">Questions</a></li>
						<li class="n4"><a href="<%= request.getContextPath()%>/designer/lookup/index.html">Lookup Tables</a></li>
						<li class="n5"><a href="<%= request.getContextPath()%>/designer/user/list.html">Users</a></li>
						<li class="n6"><a href="<%= request.getContextPath()%>/designer/group/list.html">Groups</a></li>
					</ul>
			</div>
			<!--END: Header -->
			<!--START: conent -->
			<div id="content">
				<div style="overflow:hidden;width:100%;background-color:#F2F2F2;text-align:left;">
					<h3>
						<spring:message code="application.error.warn" />					
					</h3>
				</div>
				<div style="overflow:hidden;width:100%;background-color:#F2F2F2;text-align:left;">${message}
				<%
							if (ex != null)
								out.println(ex.getMessage());
						%>
				</div>
				
				<div style="overflow:hidden;width:100%;background-color:#F2F2F2;text-align:left;">
					<a href="#" onclick="$('#detail_error_msg').toggle();"><spring:message code="application.error.detail" /></a>
				</div>
				<div id="detail_error_msg" style="display: none">
				<textarea style="width:100%;font-size:8pt;" wrap="off" rows="10">
					<%
						if (ex != null) {
					%>			
					
						<%
							ex.printStackTrace(new java.io.PrintWriter(out));
						%>					
					<%
						}
					%>
					</textarea>
				</div>
				<div>
					<button onclick="history.back();">
						<spring:message code="button.back" />
					</button>
				</div>
			</div>
			<!--END: conent -->
			<!--START: Footer -->
			<div class="footer"></div>
			<!--END: Footer -->
		</div>
		</center>
	</body>
</html>